/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mwt.xml.xdbforms.dblayer.metadata.impl;

/**
 * Progetto Master Web Technology
 * Definisce un JavaBean per memorizzare i contenuti
 * dei metadati di una singola colonna. Questa classe
 * funge da transfer object per inoltre i dati per le richieste
 * di mapping.
 * @author Gianfranco Murador, Cristian Castiglia, Matteo Ferri
 */
public class ColumnMetaData {

    /**
     * Nome colonna
     */
    private String colName;

    /**
     * Nome del tipo
     */
    private String typeName;

    /**
     * lunghezza del campo
     */
    private Integer displaySize;

    /**
     * lunghezza tipo frazionali
     */
    private Integer fractional;
    private String[] enumSetValues;
    private String defaultValue;
    private String xschemaTypeName;
    private boolean nullable;
    private boolean  autoIncrement;


    /**
     * verifica se il campo è autoincrement
     * @return
     */
    public boolean isAutoIncrement() {
        return autoIncrement;
    }

    /**
     * metodo set
     * @param autoIncrement
     */

    public void setAutoIncrement(boolean autoIncrement) {
        this.autoIncrement = autoIncrement;
    }

    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public String getXschemaTypeName() {
        return xschemaTypeName;
    }

    public void setXschemaTypeName(String xschemaTypeName) {
        this.xschemaTypeName = xschemaTypeName;
    }

    public ColumnMetaData() {
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public ColumnMetaData(String colName, String typeName, Integer size, Integer fractional, String[] enumSetValues) {
        this.colName = colName;
        this.typeName = typeName;
        this.displaySize = size;
        this.fractional = fractional;
        this.enumSetValues = enumSetValues;
    }

    public ColumnMetaData(String colName, String typeName, Integer size) {
        this.colName = colName;
        this.typeName = typeName;
        this.displaySize = size;
    }

    public ColumnMetaData(String colName, String typeName, Integer size, Integer fractional) {
        this.colName = colName;
        this.typeName = typeName;
        this.displaySize = size;
        this.fractional = fractional;
    }

    public String getColName() {
        return colName;
    }

    public void setColName(String colName) {
        this.colName = colName;
    }

    public String[] getEnumSetValues() {
        return enumSetValues;
    }

    public void setEnumSetValues(String[] enumSetValues) {
        this.enumSetValues = enumSetValues;
    }

    public Integer getFractional() {
        return fractional;
    }

    public void setFractional(Integer fractional) {
        this.fractional = fractional;
    }

    public Integer getDisplaySize() {
        return displaySize;
    }

    public void setDisplaySize(Integer size) {
        this.displaySize = size;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
